<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@	page import="java.util.*"%>
<%
	Random rand = new Random();
	int num = rand.nextInt(100000);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" href="css/form.css" type="text/css">

<script type="text/javascript" src="js/jquery.columnfilters.js?v=<%=num%>"></script>
<script type="text/javascript" src="js/yunyshaMaster.js?v=<%=num%>"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$('table#filterTable1').columnFilters({alternateRowClassNames:['rowa','rowb']});
	});
</script> 

<style type="text/css">
table tr th {
	background-color: #d3DADE;
	padding: 3px;
}
table tr.rowb { background-color:#EEEEEE; }

table tr.filterColumns td { padding:2px; }

body { padding-bottom:150px; }

</style>
</head>
<body>
<jsp:include page="header.jsp" />
<jsp:include page="menu.jsp" /><div class="main_content">
<div>

<div style="margin-left:10px">

<div class="sectionheading">Design Master</div>

<div class="clear">&nbsp;</div>

    <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/redmond/jquery-ui.css" />
    <link rel="stylesheet" type="text/css" href="css/ui.jqgrid.css" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>
    <script type="text/javascript" src="js/grid.locale-en.js"></script>
    <script type="text/javascript" src="js/jquery.jqGrid.min.js"></script>

 <script type="text/javascript">
    //<![CDATA[
    $(function(){
        var myGrid = $("#testgrid");
        myGrid.jqGrid({
            url:"http://localhost:8080/Yunysha/DesignMasterServlet",
            datatype: 'json',
            mtype: 'POST',
            height: 250,
            colNames:['Design Number','Style Number', 'Date of Creation','Gender','Exclusive'],
            colModel:[
//                 {name:'id',index:'id', width:62, sorttype:"int", key:true, search:false},
                {name:'Design Number',index:'Design Number', width:70, sorttype:"string",search:true},
                {name:'Style Number',index:'Style Number', width:62,search:true,sorttype:"int"},
                {name:'Date of Creation',index:'Date of Creation', width:68,sorttype:"string",search:true, align:"right"},
                {name:'Gender',index:'Gender', width:44, align:"right",sorttype:"float",search:true},
                {name:'Exclusive',index:'Exclusive', width:54,align:"right",sorttype:"float",search:true}
               
            ],
            multiselect: true,
            multiboxonly:true,
            caption: "Search Results",
            pager: '#testgridpager',
            gridview: true,
            pgbuttons:false,
            pgtext:'',
            shrinkToFit: false,
            width: ($.browser.webkit?466:497),
            loadonce: true,
            sortname: 'id',
            sortorder: 'asc',
            multiselect: true,
            hoverrows: false,
            rowNum: 2000,
            jsonReader : { cell: "" }
        });

        //toolbar search
        myGrid.jqGrid('filterToolbar',{stringResult:true,searchOnEnter:false});
    });
    //]]>
    </script>
    
    
    <div align="center">
 <table id="testgrid" align="center"><tr><td/></tr></table>
    <div id="testgridpager"></div>
    </div>
    
    <!-- 


<table id="filterTable1" cellspacing="0" cellpadding="2">
<thead>
<tr>

	<th>Design number</th>
	<th>Style Number</th>
	<th>Date of creation</th> 
	<th>Gender</th>
	<th>Exclusive</th>
	
</tr>
</thead>
<tfoot></tfoot>
<tbody>

<tr>
	<td>1001</td><td>S1001</td><td>29/07/2012</td><td>Male</td><td>Y</td>
</tr>

<tr>
	<td>1002</td><td>S1002</td><td>05/08/2012</td><td>Female</td><td>Y</td>
</tr>

<tr>
	<td>1003</td><td>S1003</td><td>10/08/2012</td><td>Female</td><td>Y</td>
</tr>
<tr>
	<td>1004</td><td>S1004</td><td>12/08/2012</td><td>Unisex</td><td>N</td>
</tr>
<tr>
	<td>1005</td><td>S1005</td><td>14/08/2012</td><td>Unisex</td><td>Y</td>
</tr>
<tr>
	<td>1006</td><td>S1006</td><td>06/09/2012</td><td>Unisex</td><td>N</td>
</tr>
<tr>
	<td>1007</td><td>S1007</td><td>15/09/2012</td><td>Male</td><td>N</td>
</tr>
</tbody>
</table>
-->
</div>



<ul id="thicktabs" style="margin-top:40px;margin-left:10px">
	<li><a id="tab-1" href="#" onclick="changeTabs('1')">Diamond</a></li>
	<li><a id="tab-2" href="#" onclick="changeTabs('2')">Metal</a></li>
	<li><a id="tab-3" href="#" onclick="changeTabs('3')">Findings</a></li>
	</ul>
<br style="clear: left" />
<form name="input" action="http://localhost:8080/Yunysha/designMaster.do?subAction=save" method="post" ENCTYPE="multipart/form-data">
<div class="tab_div" style="margin-left:10px;display:" id="tab_div">
<table id="fragment-1"  style="display:">
<tr><td width="80%">
<table>
<tr>
<td>Product Category</td>
<td><select class="Country_field_required" id="txtMetalCategory" name="zone">
     <option selected="selected" value="">---Select---</option>
      <option  value="DPN">Pendant</option>
       <option value="DPE">Pendant Earring Set</option>
        <option value="DRI">Rings</option>
         <option value="DER">Earrings</option>
          <option value="DNK">Necklace</option>
          <option value="DNE">Necklace Earring Set</option>
           <option value="DBR">Braclet</option>
            <option value="DRB">Round Bangle</option>
             <option value="DOB">Oval Bangle</option>
             <option value="DAS">Accessaries</option>
     
	</select>   </td>
	<td>
	<input type="button" value="Upload Image" onclick="open_win()">
	</td>
</tr>
<tr>
<td>Design Code:</td>
<td><input type="text" value="" id="designCode" class="text_field_required" style="disabled:disabled" ></td>
<td>Style Code:</td>
<td><input type="text" value="" id="styleCode" class="text_field_required" ></td>
<tr>
<td>Gender:</td>
<td>
<select class="Country_field_required" id="txtGender" name="zone">
     <option selected="selected" value="">---Select---</option>
      <option  value="Male">Male</option>
      <option  value="Female">Female</option>
      </select>
</td>
<tr>

<td>Diamond/Colour Stone</td>
<td>Shape</td>
<td>Size</td>
<td>Band</td>
<td>Pieces</td>
<td>Weight</td>
</tr>
<tr>
<td><input type="text" value="" id="txtDiamond1" class="text_field_required" ></td>
<td><input type="text" value="" id="txtShape1" class="text_field_required"></td>
<td><input type="text" value="" id="txtSize1" class="text_field_required"></td>
<td><input type="text" value="" id="txtBand1" class="text_field_required"></td>
<td><input type="text" value="" id="txtPieces1" class="text_field_required"></td>
<td><input type="text" value="" id="txtWeight1" class="text_field_required"></td>
</tr>
<tr>
<td><input type="text" value="" id="txtDiamond2" class="text_field_required" ></td>
<td><input type="text" value="" id="txtShape2" class="text_field_required" ></td>
<td><input type="text" value="" id="txtSize2" class="text_field_required"></td>
<td><input type="text" value="" id="txtBand2" class="text_field_required"></td>
<td><input type="text" value="" id="txtPieces2" class="text_field_required"></td>
<td><input type="text" value="" id="txtWeight2" class="text_field_required"></td>
</tr>
<tr>
<td><input type="text" value="" id="txtDiamond3" class="text_field_required" ></td>
<td><input type="text" value="" id="txtShape3" class="text_field_required"></td>
<td><input type="text" value="" id="txtSize3" class="text_field_required"></td>
<td><input type="text" value="" id="txtBand3" class="text_field_required"></td>
<td><input type="text" value="" id="txtPieces3" class="text_field_required"></td>
<td><input type="text" value="" id="txtWeight3" class="text_field_required"></td>
</tr>
<tr>
<td><input type="text" value="" id="txtDiamond4" class="text_field_required" ></td>
<td><input type="text" value="" id="txtShape4" class="text_field_required"></td>
<td><input type="text" value="" id="txtSize4" class="text_field_required"></td>
<td><input type="text" value="" id="txtBand4" class="text_field_required"></td>
<td><input type="text" value="" id="txtPieces4" class="text_field_required"></td>
<td><input type="text" value="" id="txtWeight4" class="text_field_required"></td>
</tr>
<tr>
<td><input type="text" value="" id="txtDiamond5" class="text_field_required" ></td>
<td><input type="text" value="" id="txtShape5" class="text_field_required" ></td>
<td><input type="text" value="" id="txtSize5" class="text_field_required"></td>
<td><input type="text" value="" id="txtBand5" class="text_field_required"></td>
<td><input type="text" value="" id="txtPieces5" class="text_field_required"></td>
<td><input type="text" value="" id="txtWeight5" class="text_field_required"></td>
</tr>
</table>
</td>
<td width="20%"><div id="txtPhotoPath_div"></div></td>
</tr>
</table>
<table id="fragment-2" style="display:none">

<tr>
<td>Metal Kt</td>
<td><select class="Country_field_required" id="txtMetalKt" name="txtMetalKt">
     <option selected="selected" value="">---Select---</option>
      <option  value="East">14K</option>
       <option value="West">18K</option>
        
	</select>   </td>
</tr>
<tr>
<td>Metal Colour</td>
<td><select class="Country_field_required" id="txtMetalColor" name="txtMetalColor">
     <option selected="selected" value="">---Select---</option>
      <option  value="East">Yellow</option>
       <option value="West">White</option>
        <option value="North">Two Tone</option>
         
	</select>   </td>
</tr>
<tr>
<td>14K Wt</td>
<td><input type="text" value="" id="txtMetal14KWt" class="text_field_required"></td>
</tr>
<tr>
<td>18K Wt</td>
<td><input type="text" value="" id="txtMetal18KWt" class="text_field_required"></td>
</tr>
<!-- <tr>
<td>Upload Design</td>
<td><INPUT NAME="txtdesign" TYPE="file"></td>
</tr>-->
</table>
<table id="fragment-3"  style="display:none">

<tr>
<td>Metal Kt</td>
<td><select class="Country_field_required" id="txtFindingKt" name="txtFindingKt">
     <option selected="selected" value="">---Select---</option>
      <option  value="East">14K</option>
      
       <option value="West">18K</option>
        
	</select>   </td>
</tr>
<tr>
<td>Metal Colour</td>
<td><select class="Country_field_required" id="txtFindingColor" name="txtFindingColor">
     <option selected="selected" value="">---Select---</option>
      <option  value="East">Yellow</option>
       <option value="West">White</option>
        <option value="North">Two Tone</option>
         
	</select>   </td>
</tr>
<tr>

<td>14K Wt</td>
<td><input type="text" value="" id="txtFindings14KWt" class="text_field_required"></td>
</tr>
<tr>
<td>18K Wt</td>
<td><input type="text" value="" id="txtFindings18KWt" class="text_field_required"></td>
</tr>
<tr>
<td><input type="submit" value="Submit"></td>
</tr>
</table>
</div>

<input type="hidden" id="txtPhotoPath" name="txtPhotoPath" value="">

</form>
<p class="iepara"></p>
</div>
</div>
</body>
</html:html>